package com.example.demo;

import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.core.env.PropertyResolver;

import java.util.Map;

@SpringBootApplication
public class DemoApplication extends AnalysisEventListener<Demo> {



    /**
     * 一行一行读
     * @param demo
     * @param analysisContext
     */

    @Override
    public void invoke(Demo demo, AnalysisContext analysisContext) {

        System.out.println("---"+demo);
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {

    }

    @Override
    public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) {
        System.out.println("表头="+headMap);
    }
}
